package PAT;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class PAT131 {
    public static void main(String[] args) {
        try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in))) {
            String s = bufferedReader.readLine();
            int len = s.length();
            int n1 = (len+2) / 3;
            int n2 = len+2-n1*2;
            for (int i = 0; i < n1-1; i++) {
                System.out.print(s.charAt(i));
                for (int j = 0; j < n2-2 ; j++) {
                    System.out.print(" ");
                }
                System.out.println(s.charAt(len-i-1));
            }
            System.out.print(s.substring(n1-1,n1-1+n2));
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
